package com.costmary.spper.webapp.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: sen
 * Date: 2010-9-27
 * Time: 23:16:25
 * To change this template use File | Settings | File Templates.
 */
public class SimpleServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        System.out.println("x="+request.getParameter("x"));
        out.println("doget");
        out.flush();
        out.close();
        
    }
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        out.println("dopost");
        out.flush();
        out.close();

    }
}
